<div class="tp_page_title">
	<div class="container">
		<div class="row">
			<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
				<div class="tp_page_heading">
					<h3><?php if(isset($_GET['category'])){ echo $_GET['category'];  }else { echo $this->ts_functions->getlanguage('blogtext','menus','solo');} ?></h3>
				</div>
			</div>
		</div>
	</div>
</div>

<div class="tp_gray_wrapper tp_toppadder80 tp_bottompadder80">
	<div class="container">
		<div class="row">
			<div class="col-lg-8 col-md-8 col-sm-12 col-xs-12">
			<?php if(!empty ($blog_list)){ ?>
			<?php foreach($blog_list as $blog) { ?>
				<div class="tp_blog_div">
				  <?php if(!empty($blog['blog_image'])){
					  $blog_img_src=base_url().'repo/images/'.$blog['blog_image'];
						?>
					<div class="tp_blog_img">
						<a href="<?php echo base_url();?>blogs/blog_post/<?php echo strtolower($blog['blog_slug']); ?>"><img src="<?php echo $blog_img_src; ?>" class="img-responsive" alt="blog image" /></a>
					</div>
					<?php  } ?>
					<div class="tp_blog_content">
						<h3><a href="<?php echo base_url();?>blogs/blog_post/<?php echo strtolower($blog['blog_slug']); ?>"><?php echo $blog['blog_title']; ?></a></h3>
						<ul class="tp_blog_tag">
							<li><a href="javascript:"><i class="fa fa-user"></i> Admin</a></li>
							<li><a href="javascript:"><i class="fa fa-clock-o"></i> <?php echo date("M d,Y", strtotime($blog['blog_date'])); ?></a></li>
						</ul>
						<p><?php echo substr($blog['blog_content'],0,240); ?></p>
						
						<a href="<?php echo base_url();?>blogs/blog_post/<?php echo strtolower($blog['blog_slug']); ?>" class="tp_btn "><?php echo $this->ts_functions->getlanguage('viewmoretext','commontext','solo');?></a>
					</div>
				</div>
			<?php } }else { ?>
			<!-- 404 Page STARTS -->
			
			
			<div class="tp_blog_div" >
				<img src="<?php echo $this->ts_functions->getsettings('notfoundimg','url');?>" alt="Oops , there is nothing to show" title="Oops , there is nothing to show" class="img-responsive">
			</div>
			
			
			<!-- 404 Page ENDS -->
			<?php } ?>
				
				  <div class="tp_pagination_div ">
						<nav aria-label="Page navigation" class="">
							<?php echo (isset($pagination_data))?$pagination_data:''; ?>
						</nav>
					</div>	
			</div>
			<div class="col-lg-4 col-md-4 col-sm-12 col-xs-12">
				<div class="tp_sidebar">
					<div class="tp_sidebar_div tp_sidebar_search">
						
						<div class="form-inline">
							<div class="form-group">
								<input type="text" class="form-control" placeholder="<?php echo $this->ts_functions->getlanguage('searchplaceholder','homepage','solo');?>" id="searchInput">
							</div>
							<button type="button" class="tp_btn" id="searchInputBtn"><i class="fa fa-search"></i></button>
						</div>
					</div>
					<div class="tp_sidebar_div tp_categories">
						<h3 ><?php echo $this->ts_functions->getlanguage('categories','commontext','solo');?></h3>
						<?php if(!empty($blog_categories)){ ?>
						<ul>
						<?php foreach($blog_categories as $single_category){ ?>
							<li><a href="<?php echo $basepath.'blogs/?category='.strtolower($single_category['blog_category_slug']);?>"><?php echo strtoupper($single_category['blog_category_name']);  ?></a></li>
							
						<?php  } ?>	
						</ul>
						<?php } ?>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>